/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { AdminUpdateRequest } from '../models/AdminUpdateRequest';
import type { Response } from '../models/Response';
import type { UserDeleteRequest } from '../models/UserDeleteRequest';
import type { UserEmailLoginRequest } from '../models/UserEmailLoginRequest';
import type { UserLoginRequest } from '../models/UserLoginRequest';
import type { UserQueryRequest } from '../models/UserQueryRequest';
import type { UserRegisterRequest } from '../models/UserRegisterRequest';
import type { UserUpdateRequest } from '../models/UserUpdateRequest';
import type { CancelablePromise } from '../core/CancelablePromise';
import { OpenAPI } from '../core/OpenAPI';
import { request as __request } from '../core/request';
export class UserControllerService {
    /**
     * adminUpdate
     * @param adminUpdateRequest adminUpdateRequest
     * @returns Response OK
     * @returns any Created
     * @throws ApiError
     */
    public static adminUpdateUsingPost(
        adminUpdateRequest: AdminUpdateRequest,
    ): CancelablePromise<Response | any> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/api/user/adminUpdate',
            body: adminUpdateRequest,
            errors: {
                401: `Unauthorized`,
                403: `Forbidden`,
                404: `Not Found`,
            },
        });
    }
    /**
     * deleteUser
     * @param userDeleteRequest userDeleteRequest
     * @returns Response OK
     * @returns any Created
     * @throws ApiError
     */
    public static deleteUserUsingPost(
        userDeleteRequest: UserDeleteRequest,
    ): CancelablePromise<Response | any> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/api/user/delete',
            body: userDeleteRequest,
            errors: {
                401: `Unauthorized`,
                403: `Forbidden`,
                404: `Not Found`,
            },
        });
    }
    /**
     * userEmailLogin
     * @param userEmailLoginRequest userEmailLoginRequest
     * @returns Response OK
     * @returns any Created
     * @throws ApiError
     */
    public static userEmailLoginUsingPost(
        userEmailLoginRequest: UserEmailLoginRequest,
    ): CancelablePromise<Response | any> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/api/user/emailLogin',
            body: userEmailLoginRequest,
            errors: {
                401: `Unauthorized`,
                403: `Forbidden`,
                404: `Not Found`,
            },
        });
    }
    /**
     * emailAuthCode
     * @param email email
     * @returns Response OK
     * @returns any Created
     * @throws ApiError
     */
    public static emailAuthCodeUsingPost(
        email: string,
    ): CancelablePromise<Response | any> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/api/user/email_auth_code/{email}',
            path: {
                'email': email,
            },
            errors: {
                401: `Unauthorized`,
                403: `Forbidden`,
                404: `Not Found`,
            },
        });
    }
    /**
     * getLoginUser
     * @returns Response OK
     * @throws ApiError
     */
    public static getLoginUserUsingGet(): CancelablePromise<Response> {
        return __request(OpenAPI, {
            method: 'GET',
            url: '/api/user/get/login',
            errors: {
                401: `Unauthorized`,
                403: `Forbidden`,
                404: `Not Found`,
            },
        });
    }
    /**
     * listUserByAdmin
     * @param userQueryRequest userQueryRequest
     * @returns Response OK
     * @returns any Created
     * @throws ApiError
     */
    public static listUserByAdminUsingPost(
        userQueryRequest: UserQueryRequest,
    ): CancelablePromise<Response | any> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/api/user/listByAdmin/user',
            body: userQueryRequest,
            errors: {
                401: `Unauthorized`,
                403: `Forbidden`,
                404: `Not Found`,
            },
        });
    }
    /**
     * userLogin
     * @param userLoginRequest userLoginRequest
     * @returns Response OK
     * @returns any Created
     * @throws ApiError
     */
    public static userLoginUsingPost(
        userLoginRequest: UserLoginRequest,
    ): CancelablePromise<Response | any> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/api/user/login',
            body: userLoginRequest,
            errors: {
                401: `Unauthorized`,
                403: `Forbidden`,
                404: `Not Found`,
            },
        });
    }
    /**
     * userLogout
     * @returns Response OK
     * @returns any Created
     * @throws ApiError
     */
    public static userLogoutUsingPost(): CancelablePromise<Response | any> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/api/user/logout',
            errors: {
                401: `Unauthorized`,
                403: `Forbidden`,
                404: `Not Found`,
            },
        });
    }
    /**
     * userRegister
     * @param userRegisterRequest userRegisterRequest
     * @returns Response OK
     * @returns any Created
     * @throws ApiError
     */
    public static userRegisterUsingPost(
        userRegisterRequest: UserRegisterRequest,
    ): CancelablePromise<Response | any> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/api/user/register',
            body: userRegisterRequest,
            errors: {
                401: `Unauthorized`,
                403: `Forbidden`,
                404: `Not Found`,
            },
        });
    }
    /**
     * userAdd
     * @param file file
     * @returns Response OK
     * @returns any Created
     * @throws ApiError
     */
    public static userAddUsingPost(
        file: Blob,
    ): CancelablePromise<Response | any> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/api/user/userAdd',
            formData: {
                'file': file,
            },
            errors: {
                401: `Unauthorized`,
                403: `Forbidden`,
                404: `Not Found`,
            },
        });
    }
    /**
     * userUpdate
     * @param userUpdateRequest userUpdateRequest
     * @returns Response OK
     * @returns any Created
     * @throws ApiError
     */
    public static userUpdateUsingPost(
        userUpdateRequest: UserUpdateRequest,
    ): CancelablePromise<Response | any> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/api/user/userUpdate',
            body: userUpdateRequest,
            errors: {
                401: `Unauthorized`,
                403: `Forbidden`,
                404: `Not Found`,
            },
        });
    }
}
